// 读取本地资源 views 页面中的index 作为路由页面和后台路由数据比对判断是否有改页面权限。生成对应的动态路由菜单
const page = require.context('./views', true, /\index.vue$/)
const requireAll = requireContext => requireContext.keys().map(requireContext)
const pageIndexList = {}
for (const item of requireAll(page)) {
  if (item.default.name) {
    pageIndexList[item.default.name] = item.default
  }
}
export default pageIndexList
